home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’97 / Crash & Burn / source code / (Internalized Files) / Development / Libraries / Hubauer / RectUtilities.h < prev   
C/C++ Source or Header  |  1995-03-14  |  518b  |  17 lines

  1. #pragma once
  2.  
  3. class RectUtil{
  4. public:
  5.     static void    ScaleRectToFit(Rect*    objRect,Rect*    enclRect);
  6.     static void    ScaleRectToContain(Rect* enclRect,Rect* objRect);
  7.     static void    CenterRectToFit(Rect* theRect,Rect* enclRect);        
  8.     static void    CenterRectOnPoint(Rect* theRect,Point center);
  9.  
  10.     static void    LocalToGlobal(Rect* theRect);
  11.     static void GlobalToLocal(Rect* theRect);
  12.     static short RectWidth(const Rect& r) 
  13.                     { return r.right - r.left;}
  14.     static short RectHeight(const Rect& r)
  15.                     { return r.bottom - r.top;}
  16. };
  17.